﻿@model GameSchool.Models.LectureViewModel

@{
    ViewBag.Title = Model.lec.title;
    ViewBag.LikeAmountToGain = Model.lec.likeAmountToGainXP;
    ViewBag.LikeXPAmount = Model.lec.likeXPAmount;
    Layout = "~/Views/Shared/_LayoutTeacher.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="mainSectionStuff">
    <h2>Create Lecture</h2>
    <div class="createForm">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)
                @Html.HiddenFor(x => x.levelID)
                @Html.HiddenFor(x => x.courseID)
                @Html.HiddenFor(x => x.lectureID)
                @Html.HiddenFor(x => x.lectureXP)
                <div>
                <div class="tableSubtitle">Title of lecture:</div>
                @Html.TextBoxFor(x => x.lectureTitle, new { @Value = ViewBag.Title })
                </div>
                <div>
                <div class="tableSubtitle">Description:</div>
                @Html.TextAreaFor(x => x.lectureDescription, new { rows = "3", cols = "50"})
                </div>
                <div>
                <div class="tableSubtitle">Link to video</div>
                @Html.TextAreaFor(x => x.lectureFile, new { rows = "1", cols = "50" })
                </div>
                    @*<div class="tableSubtitle">Allow approval for comments?:</div>
                    @Html.CheckBoxFor(Model => Model.lectureAllowApproval)*@
                @*<div>
                <div class="tableSubtitle">Set XP amount for comment approval:</div>
                @Html.TextBoxFor(x => x.lectureApprovalXPAmount)
                </div>*@
                <div>
                <div class="tableSubtitle">Set amounts of likes to gain bonus XP:</div>
                @Html.TextBoxFor(x => x.lectureLikeAmountToGainXP, new { @Value = ViewBag.LikeAmountToGain })
                </div>
                <div>
                <div class="tableSubtitle">Set XP amount for likes:</div>
                @Html.TextBoxFor(x => x.lectureLikeXPAmount, new { @Value = ViewBag.LikeXPAmount })
                </div>
                <p>
                    <input type="submit" value="Save" />
                </p>
        }
    </div>
</div>

@section menu{

    <li>@Html.ActionLink("Courses Overview", "TeacherHome", "Teacher")</li> 
    <li>@Html.ActionLink("Edit Course", "CourseEdit", "Course", new { CID = Model.courseID }, null)</li>    
    <li>@Html.ActionLink("Edit Levels", "LevelEdit", "Level", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("XP Asignment", "XPAsignment", "Home", new { CID = Model.courseID }, null)</li>
    <li>@Html.ActionLink("Achievements", "AssignAchievement", "Achievement", new { CID = Model.courseID }, null)</li>
}